import request from '@/utils/request'

export const pageQueryEmp = (search, page, pageSize) => request.get(`/emps?name=${search.name}&gender=${search.gender}&begin=${search.begin}&end=${search.end}&page=${page}&pageSize=${pageSize}`);
export const addEmp = (emp) => request.post("/emps", emp);//←新增员工的函数
export const getEmpById = (id) => request.get(`/emps/${id}`);//←添加请求函数
export const updateEmpById = (emp) => request.put("/emps", emp); //←根据id更新员工信息
export const deleteEmpByIds = (id) => request.delete(`/emps?ids=${id}`); //←根据id批量删除员工